package com.hnevc.liangxiangju;

/**
 *
 * 多线程
 * 继承Thread类
 * Runnable
 */
public class Example01 {
    public static void main(String[] args) {
        MyThread myThread=new MyThread();
        Thread thread=new Thread(myThread);
        thread.start();
        while (true){
            System.out.println("死循环！！");
        }

    }
}
class  MyThread implements Runnable{

    @Override
    public void run() {
        while (true){
            System.out.println("Runnable方式线程开启！！！");
        }
    }
}